#ifndef PICTUREDAO_H
#define PICTUREDAO_H

#include <vector>
#include <memory>

class QSqlDatabase;
class Picture;

class PictureDao
{
public:
    explicit PictureDao(QSqlDatabase& database);
    void init() const;

public:
    void add_picture_in_album(int album_id, Picture& picture) const;
    void remove_picture(int id) const;
    void remove_picture_for_album(int album_id) const;
    std::unique_ptr<std::vector<std::unique_ptr<Picture>>> pictures_for_album(int album_id) const;

private:
    QSqlDatabase& m_database;
};

#endif // PICTUREDAO_H
